const Joi = require("joi");
module.exports = class NewsController extends colpu.Controller {
  /**
   * @api {get} news/daily
   * @apiVersion 1.0.0
   *
   * @apiSuccess {Number} [status] 状态码
   * @apiSuccess {String} [message] 消息
   * @apiSuccess {Object} [data] 返回结果
   * @apiSuccessExample {json} Success-Response:
   * HTTP/1.1 200 OK
      {
        "data": {
          ...
        },
        "status": 0,
        "message": "ok"
      }
  */
  async daily(ctx) {
    const res = await this.service.news.daily({ type: 6 });
    ctx.respond(res);
  }
  async recommend(ctx) {
    const res = await this.service.news.recommend({ type: 6 });
    ctx.respondEncrypt(res);
  }
};
